<template>
	<view v-if="show">
		<view v-for="(value,key) in StudentStatusInfo" :key="key" @click="gotoInfo(key)">
			<statusItem :ColorType="value.status" :StudentFindPass="value"></statusItem>
		</view>
	</view>
</template>

<script>
	import statusItem from './statusItemChild/statusItem.vue'
	import {
		getStudentStatusInfoByTid
	} from '@/api/status/service.js';
	
	export default {
		props: {
			show: {
				type: Boolean,
				default: false
			},
			xmId: {
				type: Number,
				default: 0
			},
			// StudentStatusInfo: Array
		},
		data() {
			return {
				/* StudentFindPass:[
					{
						status:1,
						className:'软件技术',
						name:'小米',
						pname:'软件开发java后端'
					},
					
					{
						status:2,
						className:'移动应用',
						name:'小李四',
						pname:'大数据分析师'
					},
					{
						status:3,
						className:'网络',
						name:'小张三',
						pname:'网络工程师'
					},
					{
						status:1,
						className:'大数据',
						name:'小米',
						pname:'软件开发java后端'
					},
					{
						status:1,
						className:'软件技术',
						name:'小米',
						pname:'软件开发java后端'
					},
					{
						status:2,
						className:'软件技术',
						name:'小吴',
						pname:'测试工程师'
					},
					{
						status:3,
						className:'云计算',
						name:'小夏',
						pname:'测试工程师'
					},
					{
						status:2,
						className:'软件技术',
						name:'小吴',
						pname:'测试工程师'
					},
					{
						status:3,
						className:'云计算',
						name:'小夏',
						pname:'测试工程师'
					},
					{
						status:2,
						className:'移动应用',
						name:'小李四',
						pname:'大数据分析师'
					},
					{
						status:3,
						className:'网络',
						name:'小张三',
						pname:'网络工程师'
					},
					{
						status:1,
						className:'大数据',
						name:'小米',
						pname:'软件开发java后端'
					},
				] */
				StudentStatusInfo:[],
				tId:0
			}
		},
		components: {
			statusItem,
		},
		onLoad() {
			console.log("onLoad");
			
		},
		init() {
			// console.log("aaaa1");
			// this.loadData();
		},
		created() {
			console.log("created");
			this.tId = uni.getStorageSync("Teaid")
			this.loadData()
		},
		methods: {
			loadData() {
				console.log("lllll",this.tId);
				getStudentStatusInfoByTid(this.tId)
					.then(res => {
						this.StudentStatusInfo = res.data.list
						console.log(this.StudentStatusInfo)
						console.log(res)
					}).catch(res => {
						console.log(res)
					})
			}
		}
	}
</script>

<style>

</style>
